import Vue from 'vue'
import VueRouter from 'vue-router'
import PageOne from '../views/BookManage.vue'
import PageTwo from '../views/PageAdd.vue'
import PageThree from '../views/PageUpdate.vue'
import Index from '../views/Index.vue'
import App from "../App";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    show:true,
    name: '图书管理',
    component: Index,
    redirect:'/PageOne',
    children:[
      {
        path: '/PageOne',
        name: '查询图书',
        component: PageOne
      },
      {
        path: '/PageTwo',
        name: '添加图书',
        component: PageTwo
      },
    ]
  },
  {
        path: '/PageThree',
        name: '页面3',
        show:false,
        component: PageThree
  },
]

const router = new VueRouter({
  routes
})

export default router
